From: Philip Chimento Date: Fri, 10 Feb 2017 02:09:21 +0000 (-0800) Subject: main: Destroy GjsContext before exit X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~569 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d017e6749cacf8770726308084eefac3d746a50b;p=gnome-shell.git main: Destroy GjsContext before exit Here are a few places where I missed it before: the GjsContext must be unrefed before exiting, or it will crash on exit. https://bugzilla.gnome.org/show_bug.cgi?id=778425 --- diff --git a/src/gnome-shell-plugin.c b/src/gnome-shell-plugin.c index ab5ebec6e..35b9995ea 100644 --- a/src/gnome-shell-plugin.c +++ b/src/gnome-shell-plugin.c @@ -239,6 +239,7 @@ gnome_shell_plugin_start (MetaPlugin *plugin) * If there was a generic "hook into bug-buddy for non-C crashes" * infrastructure, here would be the place to put it. */ + g_object_unref (gjs_context); exit (1); } } diff --git a/src/main.c b/src/main.c index c88f04642..dbf0e3bd7 100644 --- a/src/main.c +++ b/src/main.c @@ -360,6 +360,7 @@ list_modes (const char *option_name, if (!gjs_context_eval (context, script, -1, "
", &status, NULL)) g_message ("Retrieving list of available modes failed."); + g_object_unref (context); exit (status); }